﻿using SqlSugar;

namespace SqlSugar_Bugs.Entities
{
    /// <summary>
    /// 报表记录实体
    /// </summary>
    [SugarTable("TB_ReportRecord")]
    [SugarIndex("IX_ReportRecord_TaskId", nameof(TaskId), OrderByType.Asc)]
    public class ReportRecordEntity
    {
        /// <summary>
        /// 报表Id（雪花Id）
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, CreateTableFieldSort = 1)]
        public long Id { get; set; }

        /// <summary>
        /// 所属任务Id
        /// </summary>
        [SugarColumn(CreateTableFieldSort = 2)]
        public long TaskId { get; set; }

        /// <summary>
        /// 报表名称
        /// </summary>
        [SugarColumn(CreateTableFieldSort = 3)]
        public string Title { get; set; }

        /// <summary>
        /// 报表文件路径
        /// </summary>
        [SugarColumn(IsNullable = true, CreateTableFieldSort = 4)]
        public string File { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [SugarColumn(CreateTableFieldSort = 5)]
        public int State { get; set; }

        /// <summary>
        /// 错误消息
        /// </summary>
        [SugarColumn(IsNullable = true, CreateTableFieldSort = 6)]
        public string ErrorMessage { get; set; }
    }
}
